// 4. 一个JavaScript文件如下，
// 请通过animalFactory的用法来推断其对应的TypeScript声明文件
/**
createAnimal("dog");
createAnimal("giraffe", {name: "ronald"});
createAnimal("panda", {name: "bob", height: 400});
createAnimal("cat", {name: 'jack', weight: 32});
 */

declare namespace AnimaFactory{
  interface AnimaOptions {
    name: string;
    height?: number;
    weight?: number
  }
  export type create = (name: string, animalOptions?: AnimaOptions) => void
}
declare var createAnimal: AnimaFactory.create
